<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.example.excel.Listener.UserSessionListener" %>
<html>
<head>
    <title>展示界面</title>

    <style>
        table {
            border: 5px;
            width: 500px;
        }

        th {
            border: 1px solid black;
            text-align: center;
            height: 50px;
            vertical-align: bottom;
            padding: 0;
        }

        body {
            margin: 0 auto;
            width: 80%;
            text-align: center;
        }

        .logout-button {
            position: fixed;
            top: 20px;
            right: 20px;
        }

    </style>
</head>
<body>
<h3>
    welcome
    ${student.name}
</h3>

<h4>
    个人信息如下：
    ${student}
</h4>

<h4>
    当前用户数量为： <%=UserSessionListener.USER%>位
</h4>

<div>
    <table>
        <thead>
        <tr>
            <th>name</th>
            <th>sex</th>
            <th>age</th>
            <th>address</th>
        </tr>
        </thead>
        <caption>学生成绩表</caption>
        <tbody>
        <c:forEach items="${Students}" var="Student">
            <tr>
                <th>${Student.name}</th>
                <th>${Student.sex}</th>
                <th>${Student.age}</th>
                <th>${Student.address}</th>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<form action="<c:url value="/LogoutServlet"/>" method="post">
    <div>
        <input type="submit" value="注销" class="logout-button">
    </div>
</form>

</body>
</html>
